<%@include file="header.jsp" %>
<div id="body-system" style="min-height: 430px;">
	<div id="body-title">
		<h3>Painel de controle de ${sessionScope.logado.nome}</h3>
	</div>
	<div class="left" id="col-esquerda">
		<c:if test="${sessionScope.tipoUsuario eq 'admin'}">
			<div class="meus">
				<h3 class="meus-widgets-titulo">Meus Blogs</h3>
				<hr />
				<c:forEach var="blog" items="${meusBlogs}">
					<div class="ultimos">
						<span class="ultimos-titulo">${blog.nome}</span><br /> 
						<span class="ultimos-descricao">${blog.descricao}</span><br />
						<span class="ultimos-opcoes">
							<a href="blogexcluir.jsp?blogid=${blog.id}">
								<img src="${initParam.systemimages}crud_excluir.gif" alt="excluir" title="excluir" />
								excluir
							</a>&nbsp;|&nbsp;
							<a href="blogeditar.do?blogid=${blog.id}">
								<img src="${initParam.systemimages}crud_editar.gif" alt="editar" title="editar" />
								editar
							</a>&nbsp;|&nbsp;
							<a href="blogview.do?blogid=${blog.id}">
								<img src="${initParam.systemimages}crud_acessar.gif" alt="acessar" title="acessar" />
								acessar 
							</a>&nbsp;|&nbsp;
							<a href="bloggerenciar.do?blogid=${blog.id}">
								<img src="${initParam.systemimages}crud_gerenciar.gif" alt="gerenciar" title="gerenciar" />
								gerenciar
							</a>&nbsp;|&nbsp;
						</span>
					</div>
				</c:forEach>
			</div>
			<div class="meus">
				<h3 class="meus-widgets-titulo">Meus Posts</h3>
				<hr />
				<c:forEach var="post" items="${meusPosts}">
					<div class="ultimos">
						<span class="ultimos-titulo">${post.titulo}</span><br />
						<span class="ultimos-detalhe">
							<strong>publicado no Blog </strong> ${post.blog.nome}
						</span><br />
						<span class="ultimos-descricao">${post.texto}</span><br />
						<span class="ultimos-opcoes">
							<a href="postexcluir.jsp?postid=${post.id}">
								<img src="${initParam.systemimages}crud_excluir.gif" alt="excluir" title="excluir" />
								excluir
							</a>&nbsp;|&nbsp;
							<a href="posteditar.do?postid=${post.id}">
								<img src="${initParam.systemimages}crud_editar.gif" alt="editar" title="editar" />
								editar
							</a>&nbsp;|&nbsp;
							<a href="post.jsp?postid=${post.id}">
								<img src="${initParam.systemimages}crud_acessar.gif" alt="acessar" title="acessar" />
								acessar 
							</a>
						</span>
					</div>
				</c:forEach>
			</div>
		</c:if>
	</div>
	<div class="right" id="col-direita">
		<c:if test="${sessionScope.tipoUsuario eq 'admin'}">
			<div id="menu-admin">
				<h3>Menu</h3>
				<hr />
				<a href="blognovo.jsp">Novo Blog</a><br />
				<c:choose>
					<c:when test="${not empty meusBlogs}">
						<a href="postnovo.jsp">Novo Post</a><br />
						<a href="custompagenova.jsp">Nova CustomPage</a><br />
					</c:when>
				</c:choose>
			</div>
		</c:if>
		<div id="meus-comentarios">
			<h3 class="meus-widgets-titulo">Meus Comentarios</h3>
			<hr />
			<c:forEach var="comentario" items="${meusComentarios}">
				<div class="ultimocomentario">
					<span class="ultimocomentario-texto">Comentario: ${comentario.texto}</span><br />
				</div>
			</c:forEach>
		</div>
	</div>
	<div class="clear"></div>
</div>
<%@include file="footer.jsp" %>
